<%--
    Document   : usuarios_add2
    Created on : 28/10/2011, 12:13:36 AM
    Author     : EdsonSalazar
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<jsp:useBean id = "conectar2" scope = "application" class= "Monetario.Usuarios"/>
<jsp:useBean id = "Cargar" scope = "application" class= "Monetario.CargarArchivo"/>
<%@page import = "org.apache.commons.fileupload.servlet.*" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <script text="language/JavaScript">
            function init() {
                document.getElementById('file_upload_form').onsubmit=function() {
                    document.getElementById('file_upload_form').target = 'upload_target'; //'upload_target' is the name of the iframe
        }
            }
            window.onload=init;
        </script>
    </head>
    <body>
        <div id="paso2_crear_usuario">
            <div id="step-holder">
                <div class="step-no-off">1</div>
                <div class="step-light-left">Paso 1</div>
                <div class="step-light-right">&nbsp;</div>
                <div class="step-no">2</div>
                <div class="step-dark-left"><a href="">Paso 2</a></div>
                <div class="step-dark-right">&nbsp;</div>
                <div class="step-no-off">3</div>
                <div class="step-light-left">Paso 3</div>
                <div class="step-light-round">&nbsp;</div>
                <div class="clear"></div>
            </div>
            <%
                String nombre = request.getParameter("nombres");
                String apellido = request.getParameter("apellidos");
                String alias = request.getParameter("alias");
                String direccion = request.getParameter("direccion");
                String password = request.getParameter("password");
                String tipo_usuario = request.getParameter("tipoUsuario");
                //session.setAttribute("password", "'"+password+"'");
                session.setAttribute("usuario", "null,'" + nombre + "','" + apellido + "','" + direccion + "','"+alias+"','" +password+"'," +tipo_usuario + "");
                session.setAttribute("condiciones","nombres='"+nombre+"' AND apellidos='"+apellido+"' AND direccion='"+direccion+"'");
                
                out.println("<h1>Verifique los Siguientes Datos</h1>");
                out.println("<h3>Nombres: " + nombre + "<br>");
                out.println("Nombres:" + nombre + "<br>");
                out.println("Apellidos:" + apellido + "<br>");
                out.println("Alias:" + alias + "<br>");
                out.println("Tipo Usuario:" + tipo_usuario + "<br>");
                out.println("Direccion:" + direccion + "<br>");
                out.println("</h3>");
            %>
        </div>

        <!--<form id="file_upload_form1" method="post" enctype="multipart/form-data" action="paso2_cuenta_nueva.jsp">

        <input name="file" id="file" size="27" type="file" /><br />
        <input type="submit" name="action" value="Upload" /><br />
        <iframe id="upload_target" name="upload_target" src="" style="width:0;height:0;border:0px solid #fff;"></iframe>

        </form>
        !-->
        <form id="file_upload_form" action="validar_crearUsuario.jsp" enctype="multipart/form-data" method="post">
            <div id="paso2_usuario" class="paso2_cuenta">
                <table border="0" cellpadding="0" cellspacing="0"  id="id-form">
                    <tr>
                        <th>Foto :</th>
                        <td><input name="file" id="file"   type="file" class="file_1" /></td>
                        <td>
                            <div class="bubble-left"></div>
                            <div class="bubble-inner">JPEG, GIF 5MB max per image</div>
                            <div class="bubble-right"></div>
                        </td>
                    </tr>
                    <tr>
                        <th>&nbsp;</th>
                        <td valign="top">
                            <input name="file" id="file" type="submit" value="Upload" class="form-submit"  />
                            <!--onclick="paso1_crear_cuenta();"!-->
                            <input type="button" value="regresar" class="form-reset" Onclick="crear_usuario_atras();" />
                            <iframe id="upload_target" name="upload_target" src="" style="width:0;height:0;border:0px solid #fff;"></iframe>
                        </td>
                        <td>
                            <br>
                            <br>
                        </td>
                    </tr>
                </table>
            </div>
        </form>
    </body>
</html>
